# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=alpine
pkgver=2.23
pkgrel=0
pkgdesc="Text-based email client, friendly for novices but powerful"
url="http://alpine.x10host.com/alpine/"
arch="all"
license="Apache-2.0"
makedepends="openldap-dev heimdal-dev ncurses-dev openssl-dev"
subpackages="$pkgname-dbg $pkgname-doc"
source="http://alpine.x10host.com/alpine/release/src/alpine-$pkgver.tar.xz
	0001-ssl_unix-fix-server-name-validation.patch
	"

# secfixes:
#   2.23-r0:
#     - CVE-2020-14929

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-passfile=.pine-pass \
		--without-tcl \
		--disable-shared \
		--with-system-pinerc=/etc/alpine.d/pine.conf \
		--with-system-fixed-pinerc=/etc/alpine.d/pine.conf.fixed
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="abc3675b18d6bd20a547b8e2c3f1f4c668aee2f2d20f426f28b4b3d4cfd66762777007441da3b0fda74e625c71bc2ef05434089508c2af804e62cf216df5554b  alpine-2.23.tar.xz
5e10289f292139bf576e40bda0f3539d62024309650473a2fdbb281e5d7691cc4c1d3d21f78615e2c900766eddba076f512d92f60d4fbb61e1683f35cba185aa  0001-ssl_unix-fix-server-name-validation.patch"
